package flaud

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type JudgmentReasonRouter struct{}

// InitJudgmentReasonRouter 初始化 裁判理由管理 路由信息
func (s *JudgmentReasonRouter) InitJudgmentReasonRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	jrgRouter := Router.Group("jrg").Use(middleware.OperationRecord())
	jrgRouterWithoutRecord := Router.Group("jrg")
	jrgRouterWithoutAuth := PublicRouter.Group("jrg")
	{
		jrgRouter.POST("createJudgmentReason", jrgApi.CreateJudgmentReason)             // 新建裁判理由管理
		jrgRouter.DELETE("deleteJudgmentReason", jrgApi.DeleteJudgmentReason)           // 删除裁判理由管理
		jrgRouter.DELETE("deleteJudgmentReasonByIds", jrgApi.DeleteJudgmentReasonByIds) // 批量删除裁判理由管理
		jrgRouter.PUT("updateJudgmentReason", jrgApi.UpdateJudgmentReason)              // 更新裁判理由管理
	}
	{
		jrgRouterWithoutRecord.GET("findJudgmentReason", jrgApi.FindJudgmentReason)       // 根据ID获取裁判理由管理
		jrgRouterWithoutRecord.GET("getJudgmentReasonList", jrgApi.GetJudgmentReasonList) // 获取裁判理由管理列表
	}
	{
		jrgRouterWithoutAuth.GET("getJudgmentReasonPublic", jrgApi.GetJudgmentReasonPublic) // 裁判理由管理开放接口
	}
}
